<?php

require_once 'inc/config.inc.php';
if (isset ($_GET['op']) && isset ($_GET['uin']) && isset ($_GET['session'])) {
	$op = trim($_GET['op']);
	$uin = trim($_GET['uin']);
	$sessionkey = trim($_GET['session']);
} else {
	header("LOCATION:../error_docs/index.html");
}

require_once (CONN_PATH);
require_once ('library/core.class.php');
$core = new core($db_core);
$login_arr = $core->session_login($uin, $sessionkey);
if ($login_arr['chk_uin'] == $uin) {
	$_SESSION['account_arr'] = $login_arr;
	if ($op == 'setIcon') {
		header("LOCATION:../college/mplat/roominfo.php");
	}
	elseif ($op == 'moneyChange') {
		header("LOCATION:../college/mplat/index.php");
	}
	elseif ($op == 'updateRoom') {
		header("LOCATION:../college/mplat/index.php");
	}
	elseif ($op == 'requestCompetiton') {
		header("LOCATION:../college/mplat/index.php");
	}
} else {
	header("LOCATION:../college/mplat/index.php");
}
?>